<?php use_helper("i18n")?>
<?php $intMenu = $sf_params->get( "provinceId" );?>
<?php $culture = $sf_user->getCulture();?>
<div id="left-nav-1">
    <div class="h-left-menu">
        <span><?php echo __("Weather")#สภาพอากาศ?></span>
    </div>
    <div id="weather-left-nav"
        class="verticalNav noJS jAccordion-keepLinksEnabled">
        <ul class="jAccordion-slidesWrapper">
            <li class="jAccordion-slide"><a href="javascript:void(0)">สภาพอากาศประเทศไทย</a>
            </li>
            <?php $idx = 1;?>
            <?php foreach( $regions as $region ):?>
            <?php $regionId = $region->getIgeographicRegion()?>
            <?php if( $regionId == 0 || $regionId == 7 ) continue;?>
            <li class="jAccordion-slide hasSubmenu"><a href="javascript:void(0)"><?php echo TMDService::renderI18n( $region, "getSregionName", $culture )?>
            </a>
                <ul class="sub-left-menu">
                    <li><a href="<?php echo url_for("weather/index")?>">สภาพอากาศ<?php echo TMDService::renderI18n( $region, "getSregionName", $culture )?>
                    </a></li>
                    <?php $provinces = $region->getProvincess()?>
                    <?php foreach( $provinces as $province ):?>
                    <li
                    <?php echo $province->getIprovinceId() == $sf_params->get("provinceId")? ' class="activeSub"': ''?>>
                        <a href="<?php echo url_for( "weatherProvince/index" )?>?regionIndex=<?php echo $idx?>&provinceId=<?php echo $province->getIprovinceId()?>&regionId=<?php echo $region->getIgeographicRegion()?>"><?php echo TMDService::renderI18n( $province, "getSname", $culture )?>
                    </a>
                    </li>
                    <?php endforeach;?>
                </ul>
            </li>
            <?php $idx++?>
            <?php endforeach;?>
        </ul>
    </div>
</div>
<div class="clear"
    style="height: 10px;"></div>
<div id="left-nav-2">
    <div class="h-left-menu">
        <span><?php echo __("Forecast")#พยากรณ์อากาศ?></span>
    </div>
    <div class="verticalNav noJS jAccordion-keepLinksEnabled">
        <ul class="jAccordion-slidesWrapper">
            <li class="jAccordion-slide"><a href="javascript:void(0)">พยากรณ์อากาศประจำวัน</a></li>
            <li class="jAccordion-slide"><a href="javascript:void(0)">พยากรณ์อากาศ 7 วัน</a></li>
            <li class="jAccordion-slide"><a href="javascript:void(0)">พยากรณ์อากาศ 3 เดือน</a></li>
            <li class="jAccordion-slide"><a href="javascript:void(0)">พยากรณ์อากาศเพื่อการเดินเรือ</a></li>
        </ul>
    </div>
</div>
<div class="clear" style="height: 10px;"></div>
<div class="line-blue"></div>
<div class="clear" style="height: 2px;"></div>
<div class="left-banner">
    <a href="javascript:void(0)">
    	<img src="<?php echo image_path("/images/banner-4.jpg")?>" width="230" height="73" />
        <div class="txt-banner-blue">
            <img src="<?php echo image_path("/images/ico-banner-blue.png")?>" width="11" height="11">
            อากาศต่างประเทศ
        </div>
	</a>
</div>
<div class="clear" style="height: 10px;"></div>
<div class="left-banner">
    <a href="javascript:void(0)">
    	<img src="<?php echo image_path("/images/banner-5.jpg")?>" width="230" height="73" />
        <div class="txt-banner-blue">
            <img src="<?php echo image_path("/images/ico-banner-blue.png")?>" width="11" height="11">อุตุนิยมวิทยาเพื่อการเกษตร
        </div>
    </a>
</div>
<div class="clear" style="height: 2px;"></div>
<div class="line-blue"></div>
<script type="text/javascript">
	function loadRegionAccordion() {
		$('#weather-left-nav').data('jAccordion').goToSlide(<?php echo $sf_params->get( "regionIndex" )?>);
	}

	callLastFuncs[callLastFuncs.length] = "loadRegionAccordion()";
</script>